#ifndef ENTITYMANAGER_H
#define ENTITYMANAGER_H

#include <vector>

#include "Entity.h"
#include "Character.h"
#include "Item.h"

class Level;

class EntityManager {
public:
	/**
	 * Adds a generic entity.
	 */
	inline void addEntity(Entity* entity) { m_entities.push_back(entity); }
	void removeEntity(Entity* entity);
	/**
	 * Add a character.
	 */
	void addCharacter(Character* character);
	/**
	 * Reset the action points for all characters to 0.
	 */
	void resetActions();
	bool actionsRemaining() const;
	
	void outputEntities(Level* currentLevel) const;
	
	
	void addItem(Item* item);
	void removeItem(Item* item);
	
	std::vector<Item *> getItemsAt(int x, int y, Level* currentLevel) const;
	
private:
	std::vector<Entity *> m_entities;
	std::vector<Character *> m_characters;
	std::vector<Item *> m_items;
};

#endif